package com.hzw.saas.service.schedule.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hzw.saas.api.schedule.bo.UserScheduleBo;
import com.hzw.saas.api.schedule.query.UserMeetingClashQuery;
import com.hzw.saas.api.schedule.query.UserScheduleQuery;
import com.hzw.saas.service.schedule.model.UserSchedule;
import com.hzw.saas.service.schedule.pojo.MeetingCheckInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author hankun
 */
@Mapper
public interface UserScheduleMapper extends BaseMapper<UserSchedule> {

    /**
     * Gets schedule.
     *
     * @param userScheduleQuery the user schedule query
     * @param page              the page
     * @return the schedule
     */
    IPage<UserScheduleBo> getSchedule(@Param("param") UserScheduleQuery userScheduleQuery, Page<UserScheduleBo> page);

    /**
     * 统计已check次数
     *
     * @param pid the pid
     * @return the schedule
     */
    Integer historyCheckCount(@Param("pid") String pid);

    /**
     * 查询存在冲突的用户信息
     *
     * @param meetingClashQuery the meeting clash query
     * @return the list
     */
    List<MeetingCheckInfo> checkMeetingClash(UserMeetingClashQuery meetingClashQuery);
}